package org.ggumm21.moneybook;

import javax.persistence.Id;

import com.google.appengine.api.users.User;
import com.googlecode.objectify.annotation.Cached;

//@Cached
public class MoneybookUser extends AbstractDataRecord {

	@Id private String id;
	private String name;
	private String email;
	private boolean initialized;

	@SuppressWarnings("unused")
	private MoneybookUser() {	
	}
	
	public MoneybookUser(User user) {
		this.email = user.getEmail();
		this.name = user.getNickname();
		this.id = user.getUserId();
		initialized = false;
	}
	
	public String getName() {
		return this.name;
	}
	
	public String getEmail() {
		return this.email;
	}
	
	public void setInitialized() {
		this.initialized = true;
	}
	
	public boolean isInitialized() {
		return this.initialized;
	}
	
}
